package com.young.core.manager.impl;

import com.young.core.dao.EventDao;
import com.young.core.domain.EventDO;
import com.young.core.manager.EventManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collection;

@Component
public class EventManagerImpl implements EventManager {

    @Autowired
    private EventDao eventDao;

    @Override
    public void insert(EventDO event) {
        this.eventDao.insert(event);
    }

    @Override
    public void delete(int id) {
        this.eventDao.delete(id);
    }

    @Override
    public Collection<EventDO> fetch(int size) {
        return this.eventDao.fetch(size);
    }

}
